//
//  ASAvatarClassHomeModel.m
//  AvatarShow
//
//  Created by xunruiIOS on 2021/4/29.
//

#import "ASAvatarClassHomeModel.h"

@implementation ASAvatarClassHomeModel

+ (NSDictionary *)modelCustomPropertyMapper {
    return @{
                @"tID":@"id",
             };
}

- (CGFloat)showHeight{
    if (_showHeight < 1) {
        if (self.thumb_width.floatValue > 0 && self.thumb_height.floatValue > 0 && self.showWidth > 0) {
            CGFloat bili = self.thumb_width.floatValue / self.thumb_height.floatValue;
            _showHeight = self.showWidth / bili;
        }
    }
    return _showHeight;
}

- (CGFloat)showWidth{
    if (_showWidth < 1) {
        _showWidth = (SCREEN_WIDTH - 28 - 7)/2;
    }
    return _showWidth;
}
@end
